package com.program.beautymakeup.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2023/2/27-22:31
 **/
@Configuration
public class OssConfig {
    //定义公共静态常量
    public static String END_POINT = "oss-cn-chengdu.aliyuncs.com";
    public static String ACCESS_KEY_ID = "LTAI5t8zYyxMqSCRxa1TQbgS";
    public static String ACCESS_KEY_SECRET = "jhLezFOQdXbTfcnbAiaXvlbbxhpvpg";
    @Bean
    public OSS ossClient(){
        String endpoint = END_POINT;
        String accessKeyId = ACCESS_KEY_ID;
        String accessKeySecret = ACCESS_KEY_SECRET;
        //创建OSSClient实例。
        return new OSSClient(endpoint, accessKeyId, accessKeySecret);
    }

}
